package org.example.util.collection;

import com.alibaba.fastjson2.JSONArray;

import java.util.Arrays;

/**
 * TODO 写个注释呗
 *
 * @author Maple
 * @date 2023-12-08
 */
public class TupleUtil {

    public static <L, R> Pair <L, R> pair (L l, R r) {
        return new Pair<>(l, r);
    }

    public static JSONArray getJsonArray () {
        return new JSONArray();
    }

    public static JSONArray getJsonArray (Object... objects) {
        JSONArray jsonArray = getJsonArray();
        if(null == objects) return jsonArray;
        jsonArray.addAll(Arrays.asList(objects));
        return jsonArray;
    }

}
